export default class Table {
  constructor() {}

  static getTabledata(http, storeId, tableId) {
    return http.get('/api/stores/' + storeId + '/postable/' + tableId).then(
      response => {
        return response.data;
      })
  }

  //获取台桌所属店铺
  static getWxInitData(http, tableId) {
    // http://localhost:8080/api/stores/wxinit/tables/1dc24c74847649ba9ecfb4e8c26b9e38/wxinit
    return http.get('/api/stores/wxinit/tables/' + tableId +
      '/wxinit').then(
      response => response.data,
      response => {
        console.log("http error");
      }
    );
  }
}
